package com.demo.controllers;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * @Description:
 * @author: fanfan
 * @date: 2018/5/10 20:38
 */
@RestController
public class TestController {

    @RequestMapping("/testa")
    public String test1(){
        List<Integer> list=new ArrayList<>();
        for(int i=0;i<1000000;i++){
            list.add(i);
        }
        return "1";
    }

    @RequestMapping("/testl")
    public String test2(){
        List<Integer> list=new LinkedList<>();
        for(int i=0;i<1000000;i++){
            list.add(i);
        }
        return "2";
    }
}
